package com.hancai.barrage;


import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.concurrent.Executor;

@MapperScan(basePackages = "com.hancai.barrage.mapper")
@SpringBootApplication
public class BsServerApplication {


    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(BsServerApplication.class, args);
        String[] beanNames = context.getBeanNamesForType(Executor.class);
        for (String beanName : beanNames) {
            //applicationTaskExecutor
            System.out.println(beanName);
        }
        Object obj = context.getBean("applicationTaskExecutor");
        //ThreadPoolTaskExecutor
        System.out.println(obj);
    }

}
